﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PeertoPeerObjectShare.PacketHandler
{
    public class PackageContainer
    {
        public string to {get; set;}
        public string from { get; set; }
        public string message { get; set; }

       public PackageContainer(string dest, string sent, string msg)
        {

            to = dest;
            from = sent;
            message = msg;

        }

        public String[] toArray()
        {

            String[] container = null;


            try
            {
                container = new String[2];
                container[0] = to;
                container[1] = from;
                container[2] = message;

            }
            catch (ArgumentNullException exception)
            {
                Console.WriteLine(exception.Message);
            }
            return container;

        }


    }
}
